<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>修改门店</title>
<!--公共样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/reset.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/common.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome.min.css">
<!--公共样式结束-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/module_form.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/page_memberAdd.css">
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.min.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.timer.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Js/common.js"></script>
</head>

<body>
	<div class="page_header">
		<div class="tabbar">
			<ul class="tab clearfix" tabname="tab1">
				<li class="tabhover" show="tab1_0">修改门店</li>
			</ul>
		</div>
	</div>
	<div class="page_wraper">
		<div id="tab1_0" fortab="tab1">
			<form action="" method="post" id="memberAdd_form">
			<input type="hidden" value="{$detail.id}" id="id" />
				<table cellpadding="0" cellspacing="0" class="module_form" width="600">
			<fieldset>
				<tr>
					<td style="width: 100px;"><label for="title">门店名称：<em>*</em></label></td>
					<td class="ele_content">
						<input value="{$detail.title}" type="text" id="title" class="form_ele_text width_200">
					</td>
					<td style="width: 100px;"><label for="tel">固定电话：<em>*</em></label></td>
					<td class="ele_content">
						<input value="{$detail.tel}" type="text" id="tel" class="form_ele_text width_200">
					</td>
				</tr>
				<tr>
					<td style="width: 100px;"><label for="mobile">手机号码：<em>*</em></label></td>
					<td class="ele_content">
						<input value="{$detail.mobile}" type="text" id="mobile" class="form_ele_text width_200">
					</td>
					<td style="width: 100px;"><label for="email">邮箱：<em>*</em></label></td>
					<td class="ele_content">
						<input value="{$detail.email}" type="text" id="email" class="form_ele_text width_200">
					</td>
				</tr>
				<tr>
					<td style="width: 100px;"><label for="sort">排序号：<em>*</em></label></td>
					<td class="ele_content">
						<input value="{$detail.sort}" type="text" id="sort" class="form_ele_text width_200">
					</td>
				</tr>
				</fieldset>
			</table>
			</form>
		</div>
	</div>
	<div class="page_footer pdtd10">
		<input type="button" name="submit" value="确  认"  class="form_ele_submit"/>
		<input type="reset" name="reset"   value="取  消"  class="form_ele_reset"/>
	</div>
</body>
<script type="text/javascript">
	//弹出窗口全局变量
	var api = frameElement.api, W = api.opener;

	$(function(){
		//滑动门
		$('.tabbar li').click(function(){
			var tabname = $('.tabbar>ul').attr('tabname');
			$('.tabbar li').removeClass('tabhover');
			$(this).addClass('tabhover');
			
			$('div[fortab="'+tabname+'"]').hide();
			$('#'+$(this).attr('show')).show();
		});
		
		//表格隔行换色
		$('.module_form tr:odd').addClass('odd');
		$('.module_form tr:even').addClass('even');
		
		//表单操作
		//重置
		$('.form_ele_reset').on('click',function(){
			$('#memberAdd_form').get(0).reset();
		});
		
		//提交
		$('.form_ele_submit').on('click',function(){
			//通过POST直接提交表单
			//$('#memberAdd_form').get(0).submit();
			//etcommon.maskShow();
			
			var tipsObj = windowApi.lhgdialog.tips('正在提交数据...',10,etIcon.loading);
			
			//通过Ajax提交表单
			var postData = {};
			postData.id      = $('#id').val();
			postData.title   = $('#title').val();
			postData.tel     = $('#tel').val();
			postData.mobile  = $('#mobile').val();
			postData.email   = $('#email').val();
			postData.sort    = $('#sort').val();
			
			$.post("{:U('Company/outletEdit')}", postData ,
				function(data){
					tipsObj.close();
					windowApi.lhgdialog.tips('修改门店成功！',1,etIcon.success,function(){
						
						frameApi.close(); //关闭当前窗口
						//windowApi.lhgdialog.list['d001'].close(); //指定关闭Id的窗口
					});
				}, "json"
			);
		});
	});
</script>
</html>
